package com.mebs.edi.model.edi.e214;

import javax.persistence.Column;
import javax.persistence.Embeddable;

import com.mebs.edi.model.dom.DomAttribute;
import com.mebs.edi.model.dom.DomEntity;

/**
 * 
 * LX section of a 214 EDI file 
 * 
 * @author nit
 *
 */
@Embeddable
@DomEntity(name = "LX")
public class Edi214Lx {
	
	@Column(nullable = true, length = 6)
	@DomAttribute
	private String lx01; 	// Line Number Reference (Leg Ref Number)
	
	public Edi214Lx() {
		super();
	}

	public String getLx01() {
		return lx01;
	}

	public void setLx01(String lx01) {
		this.lx01 = lx01;
	}

	@Override
	public String toString() {
		return "Edi214Lx [lx01=" + lx01 + "]";
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((lx01 == null) ? 0 : lx01.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Edi214Lx other = (Edi214Lx) obj;
		if (lx01 == null) {
			if (other.lx01 != null)
				return false;
		} else if (!lx01.equals(other.lx01))
			return false;
		return true;
	}
}
